//
//  BaseViewController.h
//  BoWuGuan
//
//  Created by 梁尚嘉 on 2016/10/31.
//  Copyright © 2016年 KT. All rights reserved.
//

#import <UIKit/UIKit.h>
#import "MainConfigure.h"
#import <FDFullscreenPopGesture/UINavigationController+FDFullscreenPopGesture.h>

///notes:
///self.view上新添加视图需要在self.navigationBar之下添加
///

///通知-购物车图标显示
extern NSString *const SM_NOTIFACATION_NEED_CARTITEM_SHOW;
///通知-购物车数量更新
extern NSString *const SM_NOTIFACATION_NEED_CARTITEM_UPDATE;
///通知-购物车图标隐藏
extern NSString *const SM_NOTIFACATION_NEED_CARTITEM_DISMISS;


@interface BaseViewController : UIViewController{
    BOOL _loading;
    UIView *backgroundView;
}

@property (nonatomic, strong) KTURLSessionTask *task;
@property (nonatomic, assign, getter=isLoading)BOOL loading;


//@property (nonatomic, strong) KTURLSessionTask *task;
//是否是present转场
@property (nonatomic, assign) BOOL isPresented;

@property (nonatomic, strong) UINavigationBar *navigationBar;
@property (nonatomic, strong) UINavigationItem *navigationItem;

@property (nonatomic, assign) BOOL navigationBarHidden;
@property (nonatomic, assign) BOOL navigationShadowHidden;
@property (nonatomic, strong) UIColor *navigationColor;

- (void)backAction;


/**
 *  数据加载(组件) 方法
 *  注意：动画默认延时1秒
 *============================
 */

- (void)startAnimating:(BOOL)boolean; //开始加载（BOOLEAN） NO为停止加载动画

- (void)showNetWorkError; //显示请求失败

- (void)reloadDataFromNetWork;  //再次发起请求的方法(用此组件时必须重写)
//============================
@end
